package presentationTier.actions;

import core.MovieException;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import presentationTier.MainForm;
import presentationTier.dialogs.AddMediumDialog;

/**
 *
 * @author vojta
 */
public class AddMediumAction implements ActionListener{

    MainForm form;

    public AddMediumAction(MainForm aThis) {
        form = aThis;
    }

    public void actionPerformed(ActionEvent e) {
        AddMediumDialog addDialog = null;
        try {
            addDialog = new AddMediumDialog(form, true);
        } catch (MovieException ex) {
            form.error(ex);
        }
        addDialog.setVisible(true);

    }


    
}
